#pragma once

#ifdef WGLENGINE_DLL
#define WGLENGINE_EXPORT __declspec(dllexport)
#else
#define WGLENGINE_EXPORT __declspec(dllimport)
#endif


#include "BindingPt.h"
#include "Shader.h"
#include "glm\glm.hpp"

class WGLENGINE_EXPORT SkyBoxShader : public Shader
{
protected:
	struct SkyBoxParams {
		glm::mat4 viewProjMat;
	};

	SkyBoxParams sParams;
	std::shared_ptr<UniformBlockUniform> sParamBlock;

	void Init() override
	{
		Shader::Init();
	
		Bind();
		sParamBlock = AddParameter("SkyBoxParams", &sParams, sizeof(SkyBoxParams), SKYBOX_PARAM);

		Unbind();
	}
	
	GLuint materialParam;
	GLuint projViewMat;
	GLuint shaderParam;

public:
	SkyBoxShader()
	{
		this->vertFilePath = "cubeMapVert.vert";
		this->fragFilePath = "cubeMapFrag.frag";
	}

	~SkyBoxShader()
	{

	}

	virtual void Bind() override;
	virtual void Unbind() override;
	
};